package com.platform.qujia.dao;


import com.platform.qujia.pojo.CouponActivity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
public interface CouponActivityMapper {
    int deleteByPrimaryKey(String id);

    int insert(CouponActivity record);

    int insertSelective(CouponActivity record);

    CouponActivity selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(CouponActivity record);

    int updateByPrimaryKey(CouponActivity record);

    public Map<String,Object> getActivityAllByActivityId(String activityId);

    public String checkLabelCouponActivity(Map<String, Object> param);

    public List<String> checkCouponActivityOnLabel(Map<String, Object> param);

    public  List<String> checkCouponActivity(Map<String, Object> param);

    public String checkThresholdCouponActivity(Map<String, Object> param);

    // 根据活动 ID 查询对应的 issue_id 列表
    public  List<String> getIssueIdsByActivityId(String activityId);

    BigDecimal getThresholdAmtByActivityIdAndAmt(@Param("activityId") String activityId, @Param("receivedAmt") BigDecimal receivedAmt);

    List<String> getIssueIdsByThresholdAmt(@Param("activityId") String activityId, @Param("thresholdAmt") BigDecimal thresholdAmt);

    public String getSuperGrow(Map<String, Object> param);

    public String getGrow(Map<String, Object> param);

    List<CouponActivity> queryList(CouponActivity couponActivity);

}